count(i$<$j$<\parallel$$L$$\parallel$ : $P$ $L$ i j) \\[0ex]$\,\equiv$$_{\mbox{\scriptsize def}}$$\;\;$sum(if $i$$<_{2}$$j$ $\wedge_{2}$ $P$($L$,$i$,$j$)$\rightarrow$ 1 else 0 fi $\mid$ $i$ $<$ $\parallel$$L$$\parallel$; $j$ $<$ $\parallel$$L$$\parallel$)